<!DOCTYPE html>












  


<html class="theme-next pisces use-motion" lang="zh-CN">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2"/>
<meta name="theme-color" content="#222">






  
  
    
      
    
    
      
    
  <script src="https://cdn.bootcss.com/pace/1.0.2/pace.min.js"></script>
  <link href="https://cdn.bootcss.com/pace/1.0.2/themes/blue/pace-theme-flash.min.css" rel="stylesheet">







<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />






















  

<link href="https://cdn.bootcss.com/font-awesome/4.6.2/css/font-awesome.min.css" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=6.3.0" rel="stylesheet" type="text/css" />


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=6.3.0">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=6.3.0">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=6.3.0">


  <link rel="mask-icon" href="/images/logo.svg?v=6.3.0" color="#222">









<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Pisces',
    version: '6.3.0',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: false,
    fastclick: false,
    lazyload: false,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>


  




  <meta name="description" content="react-motion文档及学习之前没怎么重视过动画，所以做出来的东西体验不是特别好，所以回过来学一些动画库，然后发现 react-motion 这个库的例子真棒，就学一下这个库的 API ，在 github 上也只有英文版文档，好在文档内容不算长，所以准备大致翻译一下。 这个库解决了什么问题？在95%的动画组件的应用场景下，我们不必采用硬编码的缓动曲线和持续时间。给你的 UI 组件设置一个刚度">
<meta name="keywords" content="react,react-motion,翻译">
<meta property="og:type" content="article">
<meta property="og:title" content="react-motion翻译及学习">
<meta property="og:url" content="http://yoursite.com/2018/08/14/react-motion翻译及学习/index.html">
<meta property="og:site_name" content="三月的米店">
<meta property="og:description" content="react-motion文档及学习之前没怎么重视过动画，所以做出来的东西体验不是特别好，所以回过来学一些动画库，然后发现 react-motion 这个库的例子真棒，就学一下这个库的 API ，在 github 上也只有英文版文档，好在文档内容不算长，所以准备大致翻译一下。 这个库解决了什么问题？在95%的动画组件的应用场景下，我们不必采用硬编码的缓动曲线和持续时间。给你的 UI 组件设置一个刚度">
<meta property="og:locale" content="zh-CN">
<meta property="og:image" content="http://yoursite.com/2018/08/14/react-motion翻译及学习/944233120.jpg">
<meta property="og:updated_time" content="2018-11-29T02:09:38.097Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="react-motion翻译及学习">
<meta name="twitter:description" content="react-motion文档及学习之前没怎么重视过动画，所以做出来的东西体验不是特别好，所以回过来学一些动画库，然后发现 react-motion 这个库的例子真棒，就学一下这个库的 API ，在 github 上也只有英文版文档，好在文档内容不算长，所以准备大致翻译一下。 这个库解决了什么问题？在95%的动画组件的应用场景下，我们不必采用硬编码的缓动曲线和持续时间。给你的 UI 组件设置一个刚度">
<meta name="twitter:image" content="http://yoursite.com/2018/08/14/react-motion翻译及学习/944233120.jpg">






  <link rel="canonical" href="http://yoursite.com/2018/08/14/react-motion翻译及学习/"/>



<script type="text/javascript" id="page.configurations">
  CONFIG.page = {
    sidebar: "",
  };
</script>

  <title>react-motion翻译及学习 | 三月的米店</title>
  









  <noscript>
  <style type="text/css">
    .use-motion .motion-element,
    .use-motion .brand,
    .use-motion .menu-item,
    .sidebar-inner,
    .use-motion .post-block,
    .use-motion .pagination,
    .use-motion .comments,
    .use-motion .post-header,
    .use-motion .post-body,
    .use-motion .collection-title { opacity: initial; }

    .use-motion .logo,
    .use-motion .site-title,
    .use-motion .site-subtitle {
      opacity: initial;
      top: initial;
    }

    .use-motion {
      .logo-line-before i { left: initial; }
      .logo-line-after i { right: initial; }
    }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-CN">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">三月的米店</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
    
      
        <h1 class="site-subtitle" itemprop="description">今儿不吃饭</h1>
      
    
  </div>

  <div class="site-nav-toggle">
    <button aria-label="切换导航栏">
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>



<nav class="site-nav">
  
    <ul id="menu" class="menu">
      
        
        
        
          
          <li class="menu-item menu-item-home">
    <a href="/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-home"></i> <br />首页</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-tags">
    <a href="/tags/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />标签</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-categories">
    <a href="/categories/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-th"></i> <br />分类</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-archives">
    <a href="/archives/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />归档</a>
  </li>

      
      
    </ul>
  

  

  
</nav>



  



</div>
    </header>

    


    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          
            

          
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2018/08/14/react-motion翻译及学习/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Mark Lee">
      <meta itemprop="description" content="折腾小久的博客,在 2018-08-01 终于基本成型啦，以后就常驻啦">
      <meta itemprop="image" content="/images/avatar.gif">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="三月的米店">
    </span>

    
      <header class="post-header">

        
        
          <h2 class="post-title" itemprop="name headline">react-motion翻译及学习
              
            
          </h2>
        

        <div class="post-meta">
          <span class="post-time">

            
            
            

            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              

              
                
              

              <time title="创建时间：2018-08-14 14:58:28" itemprop="dateCreated datePublished" datetime="2018-08-14T14:58:28+08:00">2018-08-14</time>
            

            
              

              
                
                <span class="post-meta-divider">|</span>
                

                <span class="post-meta-item-icon">
                  <i class="fa fa-calendar-check-o"></i>
                </span>
                
                  <span class="post-meta-item-text">更新于</span>
                
                <time title="修改时间：2018-11-29 10:09:38" itemprop="dateModified" datetime="2018-11-29T10:09:38+08:00">2018-11-29</time>
              
            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/前端/" itemprop="url" rel="index"><span itemprop="name">前端</span></a></span>

                
                
              
            </span>
          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <h1 id="react-motion文档及学习"><a href="#react-motion文档及学习" class="headerlink" title="react-motion文档及学习"></a>react-motion文档及学习</h1><p>之前没怎么重视过动画，所以做出来的东西体验不是特别好，所以回过来学一些动画库，然后发现 <code>react-motion</code> 这个库的例子真棒，就学一下这个库的 <code>API</code> ，在 <code>github</code> 上也只有<a href="https://github.com/chenglou/react-motion" target="_blank" rel="noopener">英文版文档</a>，好在文档内容不算长，所以准备大致翻译一下。</p>
<h2 id="这个库解决了什么问题？"><a href="#这个库解决了什么问题？" class="headerlink" title="这个库解决了什么问题？"></a>这个库解决了什么问题？</h2><p>在95%的动画组件的应用场景下，我们不必采用硬编码的缓动曲线和持续时间。给你的 <code>UI</code> 组件设置一个刚度值和阻尼值，然后让物理魔法来处理剩下的事情。这样就不必担心出现动画中断之类的小问题。这也大大地简化了 <code>API</code>。</p>
<p>这个库同时还为 <code>React</code> 的 <code>TransitionGroup</code> 提供了一个更强大的替代 <code>API</code> 。</p>
<h2 id="API"><a href="#API" class="headerlink" title="API"></a>API</h2><p>Exports:</p>
<ul>
<li>spring</li>
<li>Motion</li>
<li>StaggeredMotion</li>
<li>TransitionMotion</li>
<li>presets</li>
</ul>
<h2 id="辅助函数"><a href="#辅助函数" class="headerlink" title="辅助函数"></a>辅助函数</h2><blockquote>
<p>-spring: (val: number, config?: SpringHelperConfig) =&gt; OpaqueConfig</p>
</blockquote>
<p>与相关的组件一起用，明确如何动画到目标值，比如 <code>spring(10, {stiffness: 120, damping: 17})</code>意味着以 <strong>120</strong> 的 <em>刚度</em> 和 <strong>17</strong> 的 <em>阻尼</em>运动到<em>目标值</em> 10。</p>
<ul>
<li><code>val</code> ：目标值</li>
<li><code>config</code> : 可选，作进一步调整。可能的属性值：<ul>
<li><code>stiffness</code> : 刚度，可选，默认 <code>170</code></li>
<li><code>damping</code> : 阻尼，可选， 默认 <code>26</code></li>
<li><code>precision</code> : 可选，默认 <code>0.01</code>， 指定内插值的舍入和速度，内部值，一般外部不用去改变改值。</li>
</ul>
</li>
</ul>
<blockquote>
<p>Presets for {stiffness, damping}</p>
</blockquote>
<p>大部分是像 <code>spring(10, presets.wobbly)</code> 、 <code>spring(20, {...presets.gentle})</code> 这样子使用 spring 的预设配置。</p>
<h2 id="lt-Motion-gt"><a href="#lt-Motion-gt" class="headerlink" title="&lt;Motion/&gt;"></a><code>&lt;Motion/&gt;</code></h2><p>一般的动画组件</p>
<h3 id="lt-Motion-gt-用法"><a href="#lt-Motion-gt-用法" class="headerlink" title="&lt;Motion/&gt; 用法"></a><code>&lt;Motion/&gt;</code> 用法</h3><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * interpolation -&gt; 插值</span></span><br><span class="line"><span class="comment"> * Motion组件的写法比较特殊，传了一个函数当作 Motion 的 chlidren属性</span></span><br><span class="line"><span class="comment">*/</span></span><br><span class="line">&lt;Motion defaultStyle=&#123;&#123;<span class="attr">x</span>: <span class="number">0</span>&#125;&#125; style=&#123;&#123;<span class="attr">x</span>: spring(<span class="number">10</span>)&#125;&#125;&gt;</span><br><span class="line">    &#123;interpolatingStyle =&gt; &lt;div style=&#123;interpolatingStyle&#125; /&gt;&#125;</span><br><span class="line">&lt;/Motion&gt;</span><br></pre></td></tr></table></figure>
<h3 id="lt-Motion-gt-属性-props"><a href="#lt-Motion-gt-属性-props" class="headerlink" title="&lt;Motion/&gt; 属性(props)"></a><code>&lt;Motion/&gt;</code> 属性(props)</h3><p>-style: Style</p>
<p>必须。 <code>Style</code> 是一个对象类型映射到上面的 <code>spring</code> 返回的数字或者是 <code>OpaqueConfig</code> 对象。在组件整个存活期间必须保持相同的值。值的意义：</p>
<ul>
<li><code>spring</code> 返回的 <code>OpaqueConfig</code> : 插值到 <code>x</code></li>
<li><code>spring</code> 返回的数字 <code>x</code>: 跳到 <code>x</code>， 不插入</li>
</ul>
<p>-defaultStyle?: PlainStyle</p>
<p>可选。<code>PlainStyle</code> 类型映射到数字，和上面的 <code>style</code> 相同键的对象，值是初始化要插入的数据。注意，在后续的渲染过程中这个属性会被忽略。从当前值插入的目标值是由 <code>style</code> 决定。</p>
<p>-children: (interpolatedStyle: PlainStyle) =&gt; ReactElement</p>
<p>必须，且是函数。</p>
<ul>
<li><code>interpolatedStyle</code>: 返回给你被插入值的 <code>style</code> 对象。举个例子： 如果你写了 <code>style={...xxx}</code>, 然后就会在函数里接收到 <code>interpolatedStyle</code> 对象，在某一时间，可能拿到这样的数据 <code>{x:5.2, y: 12.1}</code>,就可以把这些数据用到你的 <code>div</code> 上或者其他地方。</li>
<li><code>Return</code> 一定要返回一个 <code>React element</code>，这样 <code>Motion</code> 才能渲染你的组件。</li>
</ul>
<p>-onRest?: () =&gt; void</p>
<p>可选。动画休息的时候触发的回调函数。</p>
<h2 id="lt-StaggeredMotion-gt"><a href="#lt-StaggeredMotion-gt" class="headerlink" title="&lt;StaggeredMotion/&gt;"></a><code>&lt;StaggeredMotion/&gt;</code></h2><p>交错的动画组件。</p>
<p>创建一个彼此之间依赖的集合（固定长度）的动画，达到<em>自然</em>、<em>弹性</em>、<em>惊人</em>的效果。这比对一系列运动硬编码延迟的方式（不太自然的动画效果）更加有效。</p>
<h3 id="lt-StaggeredMotion-gt-用法"><a href="#lt-StaggeredMotion-gt-用法" class="headerlink" title="&lt;StaggeredMotion/&gt; 用法"></a><code>&lt;StaggeredMotion/&gt;</code> 用法</h3><figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line">&lt;StaggeredMotion</span><br><span class="line">  defaultStyles=&#123;[&#123;<span class="attr">h</span>: <span class="number">0</span>&#125;, &#123;<span class="attr">h</span>: <span class="number">0</span>&#125;, &#123;<span class="attr">h</span>: <span class="number">0</span>&#125;]&#125;</span><br><span class="line">  styles=&#123;prevInterpolatedStyles =&gt; prevInterpolatedStyles.map(<span class="function">(<span class="params">_, i</span>) =&gt;</span> &#123;</span><br><span class="line">    <span class="keyword">return</span> i === <span class="number">0</span></span><br><span class="line">      ? &#123;<span class="attr">h</span>: spring(<span class="number">100</span>)&#125;</span><br><span class="line">      : &#123;<span class="attr">h</span>: spring(prevInterpolatedStyles[i - <span class="number">1</span>].h)&#125;</span><br><span class="line">  &#125;)&#125;&gt;</span><br><span class="line">  &#123;interpolatingStyles =&gt;</span><br><span class="line">    &lt;div&gt;</span><br><span class="line">      &#123;interpolatingStyles.map(<span class="function">(<span class="params">style, i</span>) =&gt;</span></span><br><span class="line">        &lt;div key=&#123;i&#125; style=&#123;&#123;<span class="attr">border</span>: <span class="string">'1px solid'</span>, <span class="attr">height</span>: style.h&#125;&#125; /&gt;)</span><br><span class="line">      &#125;</span><br><span class="line">    &lt;<span class="regexp">/div&gt;</span></span><br><span class="line"><span class="regexp">  &#125;</span></span><br><span class="line"><span class="regexp">&lt;/</span>StaggeredMotion&gt;</span><br></pre></td></tr></table></figure>
<h3 id="lt-StaggeredMotion-gt-属性-props"><a href="#lt-StaggeredMotion-gt-属性-props" class="headerlink" title="&lt;StaggeredMotion/&gt; 属性(props)"></a><code>&lt;StaggeredMotion/&gt;</code> 属性(props)</h3><p><code>-styles:(previousInterpolatedStyles: ?Array&lt;PlainStyle&gt;) =&gt; Array&lt;style&gt;</code></p>
<p>必须,函数。<strong>不要忘记<code>&quot;s&quot;</code></strong></p>
<ul>
<li><p><code>previousInterpolatedStyles</code> 前一个插入值的 <code>styles</code> ,(第一次渲染的时候是 <code>undefined</code> ,除非提供了 <code>defaultStyles</code>)</p>
</li>
<li><p>Return 一定要返回包含<em>目的值</em>的 <code>styles</code> 数组,举个例子:[{x: spring(10), x: spring(20)}]</p>
</li>
</ul>
<p>-defaultStyles?: Array<plainstyle></plainstyle></p>
<p>可选。和 <code>Motion</code> 的 <code>defaultStyle</code> 类似，但是是一个数组。</p>
<p>-children: (interpolatedStyles: Array<plainstyle>) =&gt; ReactElement</plainstyle></p>
<p>必须，函数。和 <code>Motion</code> 的 <code>children</code> 类似, 但是接受一个插入值的数组作为函数的参数。举个例子：<code>[{x: 5}, {x: 6.4}, {x: 8.1}]</code>。</p>
<p>(没有 <code>noRest</code>, 我们没有发现有什么意义在 <code>StaggeredMotion</code> 中加入 <code>noReset</code>)</p>
<h2 id="lt-TransitionMotion-gt"><a href="#lt-TransitionMotion-gt" class="headerlink" title="&lt;TransitionMotion&gt;"></a><code>&lt;TransitionMotion&gt;</code></h2><p>帮助你创建 <code>mounting</code> 和 <code>unmounting</code> 时的动画。</p>
<h3 id="lt-TransitionMotion-gt-用法"><a href="#lt-TransitionMotion-gt-用法" class="headerlink" title="&lt;TransitionMotion&gt; 用法"></a><code>&lt;TransitionMotion&gt;</code> 用法</h3><p>有 <code>a</code>、<code>b</code>、<code>c</code> 三个项目，有各自的 <code>style</code> 配置，</p>
<hr>
<p><img src="/2018/08/14/react-motion翻译及学习/944233120.jpg" alt="Edvard Munch – The Scream"></p>
<blockquote>
<p>Edvard Munch – The Scream. ver. 1893</p>
</blockquote>

      
    </div>

    

    
    
    

    

    

    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/react/" rel="tag"><i class="fa fa-tag"></i> react</a>
          
            <a href="/tags/react-motion/" rel="tag"><i class="fa fa-tag"></i> react-motion</a>
          
            <a href="/tags/翻译/" rel="tag"><i class="fa fa-tag"></i> 翻译</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2018/08/14/懒加载/" rel="next" title="懒加载">
                <i class="fa fa-chevron-left"></i> 懒加载
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2018/08/16/几个题目/" rel="prev" title="几个题目">
                几个题目 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>


  </div>


          </div>
          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <p class="site-author-name" itemprop="name">Mark Lee</p>
              <p class="site-description motion-element" itemprop="description">折腾小久的博客,在 2018-08-01 终于基本成型啦，以后就常驻啦</p>
          </div>

          
            <nav class="site-state motion-element">
              
                <div class="site-state-item site-state-posts">
                
                  <a href="/archives/">
                
                    <span class="site-state-item-count">26</span>
                    <span class="site-state-item-name">日志</span>
                  </a>
                </div>
              

              
                
                
                <div class="site-state-item site-state-categories">
                  <a href="/categories/index.html">
                    
                    
                      
                    
                      
                    
                      
                    
                      
                    
                    <span class="site-state-item-count">4</span>
                    <span class="site-state-item-name">分类</span>
                  </a>
                </div>
              

              
                
                
                <div class="site-state-item site-state-tags">
                  <a href="/tags/index.html">
                    
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                    <span class="site-state-item-count">20</span>
                    <span class="site-state-item-name">标签</span>
                  </a>
                </div>
              
            </nav>
          

          

          

          
          

          
          

          
            
          
          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#react-motion文档及学习"><span class="nav-number">1.</span> <span class="nav-text">react-motion文档及学习</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#这个库解决了什么问题？"><span class="nav-number">1.1.</span> <span class="nav-text">这个库解决了什么问题？</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#API"><span class="nav-number">1.2.</span> <span class="nav-text">API</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#辅助函数"><span class="nav-number">1.3.</span> <span class="nav-text">辅助函数</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#lt-Motion-gt"><span class="nav-number">1.4.</span> <span class="nav-text">&lt;Motion/&gt;</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#lt-Motion-gt-用法"><span class="nav-number">1.4.1.</span> <span class="nav-text">&lt;Motion/&gt; 用法</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#lt-Motion-gt-属性-props"><span class="nav-number">1.4.2.</span> <span class="nav-text">&lt;Motion/&gt; 属性(props)</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#lt-StaggeredMotion-gt"><span class="nav-number">1.5.</span> <span class="nav-text">&lt;StaggeredMotion/&gt;</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#lt-StaggeredMotion-gt-用法"><span class="nav-number">1.5.1.</span> <span class="nav-text">&lt;StaggeredMotion/&gt; 用法</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#lt-StaggeredMotion-gt-属性-props"><span class="nav-number">1.5.2.</span> <span class="nav-text">&lt;StaggeredMotion/&gt; 属性(props)</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#lt-TransitionMotion-gt"><span class="nav-number">1.6.</span> <span class="nav-text">&lt;TransitionMotion&gt;</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#lt-TransitionMotion-gt-用法"><span class="nav-number">1.6.1.</span> <span class="nav-text">&lt;TransitionMotion&gt; 用法</span></a></li></ol></li></ol></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2018</span>
  <span class="with-love" id="animate">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Mark Lee</span>

  

  
</div>


  


<!--

  <div class="powered-by">由 <a class="theme-link" target="_blank" rel="external nofollow" href="https://hexo.io">Hexo</a> 强力驱动 v3.7.1</div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">主题 &mdash; <a class="theme-link" target="_blank" rel="external nofollow" href="https://theme-next.org">NexT.Pisces</a> v6.3.0</div>

-->



        








        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    
	
    

    
  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>


























  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=6.3.0"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=6.3.0"></script>



  
  


  <script type="text/javascript" src="/js/src/affix.js?v=6.3.0"></script>

  <script type="text/javascript" src="/js/src/schemes/pisces.js?v=6.3.0"></script>



  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=6.3.0"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=6.3.0"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=6.3.0"></script>



  



  










  





  

  

  

  

  
  

  

  

  

  

  

</body>
</html>
